inherited FRelatorioMovtoZerandoEstoque: TFRelatorioMovtoZerandoEstoque
  Left = 193
  Top = 214
  Width = 1066
  Caption = 'Estoque / Relat'#243'rios'
  OldCreateOrder = True
  PixelsPerInch = 96
  TextHeight = 16
  inherited Panel1: TPanel
    Width = 1096
  end
  inherited Panel2: TPanel
    Width = 1096
    Caption = 'MOVIMENTO ZERANDO ESTOQUE'
  end
  inherited GroupBox1: TGroupBox
    object Label3: TLabel
      Left = 16
      Top = 22
      Width = 91
      Height = 16
      Caption = 'Estoque / Local'
    end
    object DBLCBLocal: TDBLookupComboBox
      Left = 16
      Top = 38
      Width = 276
      Height = 22
      Ctl3D = False
      KeyField = 'LOC_CODIGO'
      ListField = 'LOC_DESCRICAO'
      ListSource = DSLocal
      ParentCtl3D = False
      TabOrder = 0
      OnKeyDown = DBLCBLocalKeyDown
    end
    object gbDataCadastro: TGroupBox
      Left = 16
      Top = 67
      Width = 219
      Height = 54
      Caption = ' Per'#237'odo '
      TabOrder = 1
      object Label6: TLabel
        Left = 103
        Top = 22
        Width = 7
        Height = 16
        Caption = 'a'
        Font.Charset = ANSI_CHARSET
        Font.Color = clWindowText
        Font.Height = -13
        Font.Name = 'Arial'
        Font.Style = []
        ParentFont = False
      end
      object edDataIni: TDateEdit
        Left = 8
        Top = 21
        Width = 90
        Height = 21
        NumGlyphs = 2
        TabOrder = 0
      end
      object edDataFim: TDateEdit
        Left = 116
        Top = 21
        Width = 90
        Height = 21
        NumGlyphs = 2
        TabOrder = 1
      end
    end
    object RadioGroup1: TRadioGroup
      Left = 16
      Top = 128
      Width = 219
      Height = 105
      Caption = '  Saldo Estoque  '
      ItemIndex = 0
      Items.Strings = (
        'Todos'
        'Zerados'
        'Negativos')
      TabOrder = 2
    end
  end
  inherited RLReport: TRLReport
    Left = 40
    Top = 221
    Width = 1056
    Height = 816
    DataSource = DSPesquisa
    PageSetup.PaperSize = fpLetter
    PageSetup.Orientation = poLandscape
    inherited RLBand1: TRLBand
      Width = 980
      inherited RLMemo: TRLMemo
        Left = 648
        Height = 14
      end
      inherited rlInfo: TRLSystemInfo
        Left = 835
      end
      inherited rlInfo1: TRLLabel
        Left = 648
      end
      inherited RLSystemInfo1: TRLSystemInfo
        Left = 945
      end
    end
    object RLBand2: TRLBand
      Left = 38
      Top = 120
      Width = 980
      Height = 34
      BandType = btColumnHeader
      Borders.Sides = sdCustom
      Borders.DrawLeft = False
      Borders.DrawTop = False
      Borders.DrawRight = False
      Borders.DrawBottom = True
      object RLLabel1: TRLLabel
        Left = 0
        Top = 0
        Width = 43
        Height = 16
        AutoSize = False
        Caption = 'Lancto'
      end
      object RLLabel2: TRLLabel
        Left = 54
        Top = 0
        Width = 31
        Height = 16
        Caption = 'Data'
      end
      object RLLabel4: TRLLabel
        Left = 98
        Top = 0
        Width = 66
        Height = 16
        Caption = 'Tipo Movto'
      end
      object RLLabel5: TRLLabel
        Left = 190
        Top = 0
        Width = 38
        Height = 16
        Caption = 'Docto'
      end
      object RLLabel7: TRLLabel
        Left = 254
        Top = 0
        Width = 44
        Height = 16
        Alignment = taCenter
        Caption = 'C'#243'digo'
      end
      object RLLabel8: TRLLabel
        Left = 302
        Top = 0
        Width = 62
        Height = 16
        Caption = 'Descri'#231#227'o'
      end
      object RLLabel9: TRLLabel
        Left = 496
        Top = 0
        Width = 64
        Height = 16
        Alignment = taCenter
        Caption = 'Qtd.Movto'
      end
      object RLLabel10: TRLLabel
        Left = 566
        Top = 0
        Width = 49
        Height = 16
        Caption = 'Qtd.Est'
      end
      object RLLabel11: TRLLabel
        Left = 906
        Top = 0
        Width = 48
        Height = 16
        Caption = 'Usu'#225'rio'
      end
      object RLLabel3: TRLLabel
        Left = 622
        Top = 1
        Width = 58
        Height = 16
        Caption = 'Diferen'#231'a'
      end
      object RLLabel6: TRLLabel
        Left = 701
        Top = 1
        Width = 82
        Height = 16
        Caption = 'Solicit. Pend.'
      end
      object RLLabel18: TRLLabel
        Left = 694
        Top = 17
        Width = 44
        Height = 16
        Caption = 'C'#243'digo'
      end
      object RLLabel19: TRLLabel
        Left = 759
        Top = 17
        Width = 29
        Height = 16
        Caption = 'Qtd.'
      end
      object RLLabel20: TRLLabel
        Left = 811
        Top = 1
        Width = 82
        Height = 16
        Caption = 'Pedido Pend.'
      end
      object RLLabel21: TRLLabel
        Left = 807
        Top = 18
        Width = 44
        Height = 16
        Caption = 'C'#243'digo'
      end
      object RLLabel22: TRLLabel
        Left = 868
        Top = 17
        Width = 29
        Height = 16
        Caption = 'Qtd.'
      end
    end
    object RLBand3: TRLBand
      Left = 38
      Top = 154
      Width = 980
      Height = 16
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clBlack
      Font.Height = -11
      Font.Name = 'Arial'
      Font.Style = []
      ParentFont = False
      object RLDBText2: TRLDBText
        Left = 0
        Top = 0
        Width = 44
        Height = 14
        Alignment = taCenter
        AutoSize = False
        DataField = 'ITENSMOVEST_MOVIMENTOESTOQUE'
        DataSource = DSPesquisa
      end
      object RLDBText3: TRLDBText
        Left = 46
        Top = 1
        Width = 48
        Height = 14
        Alignment = taCenter
        AutoSize = False
        DataField = 'MOVEST_DATALANCAMENTO'
        DataSource = DSPesquisa
      end
      object RLDBText5: TRLDBText
        Left = 98
        Top = 1
        Width = 87
        Height = 14
        AutoSize = False
        DataField = 'TIPOMOVEST_ABREVIACAO'
        DataSource = DSPesquisa
      end
      object RLDBText6: TRLDBText
        Left = 190
        Top = 1
        Width = 59
        Height = 14
        AutoSize = False
        DataField = 'MOVEST_DOCUMENTO'
        DataSource = DSPesquisa
      end
      object RLDBText8: TRLDBText
        Left = 254
        Top = 1
        Width = 44
        Height = 14
        Alignment = taCenter
        AutoSize = False
        DataField = 'ITENSMOVEST_PRODUTO'
        DataSource = DSPesquisa
      end
      object RLDBText9: TRLDBText
        Left = 302
        Top = 1
        Width = 187
        Height = 14
        AutoSize = False
        DataField = 'PROD_DESCRICAOENT'
        DataSource = DSPesquisa
      end
      object RLDBText10: TRLDBText
        Left = 494
        Top = 1
        Width = 68
        Height = 14
        Alignment = taCenter
        AutoSize = False
        DataField = 'ITENSMOVEST_QUANTIDADE'
        DataSource = DSPesquisa
      end
      object RLDBText11: TRLDBText
        Left = 564
        Top = 1
        Width = 54
        Height = 14
        Alignment = taCenter
        AutoSize = False
        DataField = 'ITENSMOVEST_QTDESTANTLOCAL'
        DataSource = DSPesquisa
      end
      object RLDBText12: TRLDBText
        Left = 906
        Top = 1
        Width = 72
        Height = 14
        AutoSize = False
        DataField = 'USUARIO'
        DataSource = DSPesquisa
      end
      object RLDBText4: TRLDBText
        Left = 624
        Top = 2
        Width = 54
        Height = 14
        Alignment = taCenter
        AutoSize = False
        DataField = 'DIFERENCA'
        DataSource = DSPesquisa
      end
      object RLDBText7: TRLDBText
        Left = 694
        Top = 1
        Width = 44
        Height = 14
        Alignment = taCenter
        AutoSize = False
        DataField = 'SOLI_CODIGO'
        DataSource = DSPesquisa
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clBlack
        Font.Height = -11
        Font.Name = 'Arial'
        Font.Style = []
        ParentFont = False
        BeforePrint = RLDBText7BeforePrint
      end
      object RLDBText17: TRLDBText
        Left = 752
        Top = 1
        Width = 44
        Height = 14
        Alignment = taCenter
        AutoSize = False
        DataField = 'SOLI_QTD'
        DataSource = DSPesquisa
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clBlack
        Font.Height = -11
        Font.Name = 'Arial'
        Font.Style = []
        ParentFont = False
        BeforePrint = RLDBText7BeforePrint
      end
      object RLDBText18: TRLDBText
        Left = 807
        Top = 1
        Width = 44
        Height = 14
        AutoSize = False
        DataField = 'PED_CODIGO'
        DataSource = DSPesquisa
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clBlack
        Font.Height = -11
        Font.Name = 'Arial'
        Font.Style = []
        ParentFont = False
        BeforePrint = RLDBText7BeforePrint
      end
      object RLDBText19: TRLDBText
        Left = 860
        Top = 1
        Width = 42
        Height = 14
        Alignment = taCenter
        AutoSize = False
        DataField = 'PED_QTD'
        DataSource = DSPesquisa
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clBlack
        Font.Height = -11
        Font.Name = 'Arial'
        Font.Style = []
        ParentFont = False
        BeforePrint = RLDBText7BeforePrint
      end
    end
    object RLBand4: TRLBand
      Left = 38
      Top = 170
      Width = 980
      Height = 19
      BandType = btSummary
      object RLSystemInfo2: TRLSystemInfo
        Left = 0
        Top = 2
        Width = 203
        Height = 16
        Info = itDetailCount
        Text = 'Quantidade de Itens: '
      end
    end
  end
  inherited QPesquisa: TQuery
    SQL.Strings = (
      'SELECT'
      '  ITENSMOVIMENTOESTOQUE.ITENSMOVEST_MOVIMENTOESTOQUE,'
      '  MOVIMENTOESTOQUE.MOVEST_DATALANCAMENTO,'
      '  CENTROCUSTO.CODIGOCENTROCUSTO,'
      '  MOVIMENTOESTOQUE.MOVEST_DOCUMENTO,'
      '  MOVIMENTOESTOQUE.MOVEST_OS,'
      '  ITENSMOVIMENTOESTOQUE.ITENSMOVEST_PRODUTO,'
      '  PRODUTO.PROD_DESCRICAOENT,'
      '  ITENSMOVIMENTOESTOQUE.ITENSMOVEST_QUANTIDADE,'
      '  TIPOMOVIMENTOESTOQUE.TIPOMOVEST_ABREVIACAO,'
      '  ITENSMOVIMENTOESTOQUE.ITENSMOVEST_QTDESTANTLOCAL,'
      '  MOVIMENTOESTOQUE.USUARIO,'
      '  ITENSMOVIMENTOESTOQUE.ITENSMOVEST_QTDESTANTLOCAL -'
      '  ITENSMOVIMENTOESTOQUE.ITENSMOVEST_QUANTIDADE AS DIFERENCA,'
      '      (SELECT'
      '         MAX(SOLICITACAO.SOL_CODIGO)'
      '        FROM'
      '          SOLICITACAO'
      
        '          INNER JOIN ITENSSOLICITACAO ON (SOLICITACAO.SOL_CODIGO' +
        ' = ITENSSOLICITACAO.ITENSSOL_SOL_CODIGO)'
      '        WHERE'
      
        '          (ITENSSOLICITACAO.ITENSSOL_PRODCODIGO = ITENSMOVIMENTO' +
        'ESTOQUE.ITENSMOVEST_PRODUTO) AND'
      '          ((SOLICITACAO.EXCLUIDO IS NULL) OR'
      '           (SOLICITACAO.EXCLUIDO <> '#39'S'#39')) AND'
      '          (SOLICITACAO.SOL_SITUACAO = '#39'A'#39')  ) AS SOLI_CODIGO,'
      '      (SELECT'
      '         MAX(ITENSSOLICITACAO.FITENSSOL_QTD)'
      '        FROM'
      '          SOLICITACAO'
      
        '          INNER JOIN ITENSSOLICITACAO ON (SOLICITACAO.SOL_CODIGO' +
        ' = ITENSSOLICITACAO.ITENSSOL_SOL_CODIGO)'
      '        WHERE'
      
        '          (ITENSSOLICITACAO.ITENSSOL_PRODCODIGO = ITENSMOVIMENTO' +
        'ESTOQUE.ITENSMOVEST_PRODUTO) AND'
      '          ((SOLICITACAO.EXCLUIDO IS NULL) OR'
      '           (SOLICITACAO.EXCLUIDO <> '#39'S'#39')) AND'
      '          (SOLICITACAO.SOL_SITUACAO = '#39'A'#39')  ) AS SOLI_QTD,'
      '       ( SELECT'
      '          MAX(PEDIDO.PED_CODIGO)'
      '        FROM'
      '          PEDIDO'
      
        '          INNER JOIN ITENSPEDIDO ON (PEDIDO.PED_CODIGO =ITENSMOV' +
        'IMENTOESTOQUE.ITENSMOVEST_PRODUTO)'
      '        WHERE'
      
        '          (ITENSPEDIDO.ITENS_PED_PRODUTO = ITENSMOVIMENTOESTOQUE' +
        '.ITENSMOVEST_PRODUTO)AND'
      '          ((PEDIDO.EXCLUIDO IS NULL) OR'
      '          (PEDIDO.EXCLUIDO <> '#39'S'#39')) AND'
      '          (PEDIDO.PED_SITUACAO = 0) )PED_CODIGO,'
      '       ( SELECT'
      '          MAX(ITENSPEDIDO.ITENS_PED_QUANTIDADE)'
      '        FROM'
      '          PEDIDO'
      
        '          INNER JOIN ITENSPEDIDO ON (PEDIDO.PED_CODIGO =ITENSMOV' +
        'IMENTOESTOQUE.ITENSMOVEST_PRODUTO)'
      '        WHERE'
      
        '          (ITENSPEDIDO.ITENS_PED_PRODUTO = ITENSMOVIMENTOESTOQUE' +
        '.ITENSMOVEST_PRODUTO)AND'
      '          ((PEDIDO.EXCLUIDO IS NULL) OR'
      '          (PEDIDO.EXCLUIDO <> '#39'S'#39')) AND'
      '          (PEDIDO.PED_SITUACAO = 0) )PED_QTD'
      'FROM'
      '  ITENSMOVIMENTOESTOQUE'
      
        '  INNER JOIN MOVIMENTOESTOQUE ON (ITENSMOVIMENTOESTOQUE.ITENSMOV' +
        'EST_MOVIMENTOESTOQUE = MOVIMENTOESTOQUE.MOVEST_CODIGO)'
      
        '  INNER JOIN TIPOMOVIMENTOESTOQUE ON (TIPOMOVIMENTOESTOQUE.TIPMO' +
        'VEST_CODIGO = MOVIMENTOESTOQUE.MOVEST_TIPOMOVIMENTO)  '
      
        '  INNER JOIN PRODUTO ON (ITENSMOVIMENTOESTOQUE.ITENSMOVEST_PRODU' +
        'TO = PRODUTO.PROD_CODIGO)'
      
        '  LEFT JOIN CENTROCUSTO ON (MOVIMENTOESTOQUE.MOVEST_CENTROCUSTO ' +
        '= CENTROCUSTO.CODIGO)'
      'WHERE'
      '  (ITENSMOVIMENTOESTOQUE.ITENSMOVEST_QUANTIDADE > 0) AND'
      
        '  (ITENSMOVIMENTOESTOQUE.ITENSMOVEST_QTDESTANTLOCAL - ITENSMOVIM' +
        'ENTOESTOQUE.ITENSMOVEST_QUANTIDADE = 0)')
    Left = 336
    Top = 217
    object QPesquisaITENSMOVEST_MOVIMENTOESTOQUE: TIntegerField
      FieldName = 'ITENSMOVEST_MOVIMENTOESTOQUE'
    end
    object QPesquisaMOVEST_DATALANCAMENTO: TDateTimeField
      FieldName = 'MOVEST_DATALANCAMENTO'
      DisplayFormat = 'dd/mm/yy'
    end
    object QPesquisaCODIGOCENTROCUSTO: TStringField
      FieldName = 'CODIGOCENTROCUSTO'
      Size = 30
    end
    object QPesquisaMOVEST_DOCUMENTO: TStringField
      FieldName = 'MOVEST_DOCUMENTO'
      Size = 10
    end
    object QPesquisaMOVEST_OS: TIntegerField
      FieldName = 'MOVEST_OS'
    end
    object QPesquisaITENSMOVEST_PRODUTO: TIntegerField
      FieldName = 'ITENSMOVEST_PRODUTO'
    end
    object QPesquisaPROD_DESCRICAOENT: TStringField
      FieldName = 'PROD_DESCRICAOENT'
      Size = 60
    end
    object QPesquisaITENSMOVEST_QUANTIDADE: TFloatField
      FieldName = 'ITENSMOVEST_QUANTIDADE'
      DisplayFormat = '0.000'
    end
    object QPesquisaITENSMOVEST_QTDESTANTLOCAL: TFloatField
      FieldName = 'ITENSMOVEST_QTDESTANTLOCAL'
      DisplayFormat = '0.000'
    end
    object QPesquisaUSUARIO: TStringField
      FieldName = 'USUARIO'
      Size = 10
    end
    object QPesquisaSOLI_CODIGO: TIntegerField
      FieldName = 'SOLI_CODIGO'
    end
    object QPesquisaSOLI_QTD: TIntegerField
      FieldName = 'SOLI_QTD'
      DisplayFormat = '0.###'
    end
    object QPesquisaPED_CODIGO: TIntegerField
      FieldName = 'PED_CODIGO'
    end
    object QPesquisaPED_QTD: TFloatField
      FieldName = 'PED_QTD'
      DisplayFormat = '0.###'
    end
    object QPesquisaTIPOMOVEST_ABREVIACAO: TStringField
      FieldName = 'TIPOMOVEST_ABREVIACAO'
      Size = 10
    end
    object QPesquisaDIFERENCA: TFloatField
      FieldName = 'DIFERENCA'
    end
  end
  inherited DSPesquisa: TDataSource
    Left = 264
    Top = 214
  end
  object DSLocal: TDataSource
    DataSet = DMGestao.QLocal
    Left = 168
    Top = 240
  end
end
